<!DOCTYPE html>
<!-- saved from url=(0059)http://web.hand999.com/daili_mobile/agentmodi.php?id=672607 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统</title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="__CSS__/mui.picker.css" rel="stylesheet">
<link href="__CSS__/mui.poppicker.css" rel="stylesheet">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">

<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="__CSS__/public.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<script src="__JS__/jquery-2.1.0.min.js.下载"></script>

</head>

<body class="body">
	<div class="page_top_box">
    <center>
        <div class="page_top">
            <a href="javascript:void(0)" onclick="history.go(-1)" class="back"><img src="__IMG__/ico_back.png"></a>
            <div class="pg_name" onclick="location.reload()">修改代理信息</div>
        </div>
    </center>
    </div>
	<form id="myform" name="form1" method="post" action="">
   <div class="put_box">
		<?php foreach ($sql as $v) { ?>
		<?php } ?>
	
        	<div class="put">
        	<label class="lb">代理类型：</label>
             <input name="" type="" value="<?php 
			 if($sql['agencylv']==1){
				echo '一级代理';
			 }
			 if($sql['agencylv']==2){
				echo '二级代理';
			 }
			 if($sql['agencylv']==0){
				echo '总代理';
			 }
			 ?>" class="txt" readonly="">
        </div>
		
        <div class="put">
		<label class="lb"> 代理游戏：</label>
        	<select id="game" name="game" style="width:50%;">
            	<option value="1" selected="selected">温州麻将</option>
            </select> 
        </div>

    	<div class="put">
        	<label class="lb">姓　名：</label>
            <input id="rname" name="username" type="" value="<?php echo $sql['username'] ?>" class="txt">
        </div>        
    	<div class="put">
        	<label class="lb">昵　称：</label>
            <input id="nick" name="nickname" type="" value="<?php echo $sql['nickname'] ?>" class="txt">
        </div>
        <div class="put">
        	<label class="lb">地　区：</label>
            <input id="region" name="region" type="" value="<?php echo $sql['region'] ?>" class="txt" readonly="">
            <input id="province" name="province" type="hidden" value="北京">
            <input id="city" name="city" type="hidden" value="北京市">
            <input id="area" name="city" type="hidden" value="东城区">
        </div>
        
        <div class="btn">
        	<input type="submit" value="确定" class="btn">
        </div>
		
    </div>
	</form>
    <div class="pg_foot_box">
<center>
    <div class="pg_foot">
        <a href="<?php  echo U('Index/indexx')  ?> ">商户管理平台</a>
    </div>
</center>
</div>    
    <div id="popbg" class="pop_box_bg"></div>
    <div id="ophint" class="op_hint">正添加代理，请稍候...</div>
    
     <div id="hintbox" class="hint_box">
        <span id="hintmsg"></span>
    </div>   
    <script src="__JS__/mui.min.js.下载"></script>
	<script src="__JS__/mui.picker.js.下载"></script>
    <script src="__JS__/mui.poppicker.js.下载"></script>
    <script src="__JS__/city.data.js.下载" type="text/javascript" charset="utf-8"></script>
    <script src="__JS__/city.data-3.js.下载" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
            (function($, doc) {
            $.init();
            $.ready(function() {				
                //					//级联示例
                var cityPicker = new $.PopPicker({
                    layer: 3
                });
                cityPicker.setData(cityData3);
                var showCityPickerButton = doc.getElementById('region');
                var cityResult = doc.getElementById('region');
                showCityPickerButton.addEventListener('tap', function(event) {
                    cityPicker.show(function(items) {
                        cityResult.value = (items[0] || {}).text + " " + (items[1] || {}).text + " " + ((items[2] || {}).text!=undefined?(items[2] || {}).text:'');
                        doc.getElementById("province").value = (items[0] || {}).text;
						doc.getElementById("city").value = (items[1] || {}).text;
						doc.getElementById("area").value = ((items[2] || {}).text!=undefined?(items[2] || {}).text:'');
						//返回 false 可以阻止选择框的关闭
                        //return false;
                    });
                }, false);
            });
        })(mui, document);
        
        mui.init({
            swipeBack:true //启用右滑关闭功能
        });
        mui('.mui-switch').each(function() { //循环所有toggle
            this.addEventListener('toggle', function(event) {
                //event.detail.isActive 可直接获取当前状态
                $("#isdefault").val(event.detail.isActive ? 'Y' : 'N');
            });
        });
    </script>
    
    <script type="text/javascript">
		$(".game").click(function(){
			if($(this).attr("data-value") == 0){
				$(this).addClass("c");
				$(this).attr("data-value", 1);
			}else{
				$(this).removeClass("c");
				$(this).attr("data-value", 0);
			}
			
			var gtype = "";
			for(var i = 1; i <= 3; i++){
				if($("#gtype" + i).attr("data-value") == 1){
					if(gtype != ""){gtype += ",";}
					gtype += i;
				}
			}
			$("#gametype").val(gtype);
		});
				
		function checkForm(){
			if($("#gametype").val() == ""){
				hintPop("请选择游戏类型！"); return false;
			}
			if($("#rname").val() == ""){
				hintPop("请输入您的姓名！"); return false;
			}
			if($("#nick").val() == ""){
				hintPop("请输入代理昵称！"); return false;
			}
			if($("#pword").val() == ""){
				hintPop("请输入密码！"); return false;
			}

			SaveUser();
		}
		
		function SaveUser(){
			$("#popbg").css({"height":$(window).height() + "px", "display": "block"});
			$("#ophint").css("display", "block");
			$.post("prog.php?ac=agent&do=agmodi",
				{
					cmd:"pdkuser",
					timestamp:"1483323432",
					sign:"babd0acd8bc00e833854da99c736d335",
					agid:"672607",
					type:$("#type").val(),
					gtype:$("#gametype").val(),
					rname:$("#rname").val(),
					nick:$("#nick").val(),
					prov:$("#province").val(),
					city:$("#city").val(),
					area:$("#area").val()
				},
				function(data, status){
					if(status == "success"){
						v = $.parseJSON(data);

						if(v.result == 0){							
							hintPop(v.errorMsg);
						}else{
							$("#rname").val('');
							window.location.href="myadmin.php";
						}
						$("#ophint").css("display", "none");
						$("#popbg").css("display", "none");
						return false;
					}
				}
			);
		}
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>

<div class="mui-poppicker">		<div class="mui-poppicker-header">			<button class="mui-btn mui-poppicker-btn-cancel">取消</button>			<button class="mui-btn mui-btn-blue mui-poppicker-btn-ok">确定</button>			<div class="mui-poppicker-clear"></div>		</div>		<div class="mui-poppicker-body">		<div class="mui-picker" style="width: 33.3333%;">		<div class="mui-picker-inner">			<div class="mui-pciker-rule mui-pciker-rule-ft"></div>			<ul class="mui-pciker-list" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);"><li class="highlight" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(0deg);">北京</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-20deg);">天津</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-40deg);">河北</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-60deg);">山西</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-80deg);">内蒙古</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-100deg);">辽宁</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-120deg);">吉林</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-140deg);">黑龙江</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-160deg);">上海</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-180deg);">江苏</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-200deg);">浙江</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-220deg);">安徽</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-240deg);">福建</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-260deg);">江西</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-280deg);">山东</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-300deg);">河南</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-320deg);">湖北</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-340deg);">湖南</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-360deg);">广东</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-380deg);">广西</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-400deg);">海南</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-420deg);">重庆</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-440deg);">四川</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-460deg);">贵州</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-480deg);">云南</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-500deg);">西藏</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-520deg);">陕西</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-540deg);">甘肃</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-560deg);">青海</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-580deg);">宁夏</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-600deg);">新疆</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-620deg);">台湾</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-640deg);">香港</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-660deg);">澳门</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-680deg);">海外</li></ul>			<div class="mui-pciker-rule mui-pciker-rule-bg"></div>		</div>	</div><div class="mui-picker" style="width: 33.3333%;">		<div class="mui-picker-inner">			<div class="mui-pciker-rule mui-pciker-rule-ft"></div>			<ul class="mui-pciker-list" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);"><li class="highlight" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(0deg);">北京市</li></ul>			<div class="mui-pciker-rule mui-pciker-rule-bg"></div>		</div>	</div><div class="mui-picker" style="width: 33.3333%;">		<div class="mui-picker-inner">			<div class="mui-pciker-rule mui-pciker-rule-ft"></div>			<ul class="mui-pciker-list" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);"><li class="highlight" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(0deg);">东城区</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-20deg);">西城区</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-40deg);">崇文区</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-60deg);">宣武区</li><li class="visible" style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-80deg);">朝阳区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-100deg);">丰台区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-120deg);">石景山区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-140deg);">海淀区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-160deg);">门头沟区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-180deg);">房山区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-200deg);">通州区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-220deg);">顺义区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-240deg);">昌平区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-260deg);">大兴区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-280deg);">怀柔区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-300deg);">平谷区</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-320deg);">密云县</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-340deg);">延庆县</li><li style="transform-origin: center center -90px; transform: translateZ(90px) rotateX(-360deg);">其它区</li></ul>			<div class="mui-pciker-rule mui-pciker-rule-bg"></div>		</div>	</div></div>	</div></body></html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  